home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000036_icon-group-sender _Tue May 26 12:40:28 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id MAA27051
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 26 May 1998 12:40:27 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA06721; Tue, 26 May 1998 12:40:21 -0700
  7. From: F.G.van.Dorp@digimedia.nl (F.G. van DORP)
  8. To: icon-group@optima.CS.Arizona.EDU
  9. Subject: 1-st impressions
  10. Date: Sat, 23 May 1998 12:56:24 GMT
  11. Message-Id: <3568c329.5170584@smtp.NL.net>
  12. X-Mailer: Forte Agent 1.01/16.397
  13. Mime-Version: 1.0
  14. Content-Type: text/plain; charset=us-ascii
  15. Content-Transfer-Encoding: 8BIT
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18. Content-Length: 1764
  19.  
  20.  
  21. As the subject says, here are some Icon phenomena which,
  22. after experimenting for a couple of weeks, struck me as interesting,
  23. peculiar, awkward, etc. :
  24.  
  25. 0) Scope restriction inside procedures automatic and no
  26.     special syntax for variables (v. PERL e.g.)
  27.  
  28. 1)  WHILE - you can't use the "{" without the DO in front.
  29.  
  30. 2) MUTUAL EVAL. - doesn't backtrack, only difference
  31.     with the COMPOUND EXPR. seems to be the option
  32.     of selecting the outcome expression.
  33.  
  34. 3) INDEXING very consistent (strings, lists, sets, even records)
  35.  
  36. 4) SETS can't be concatenated (no automatic conversion to
  37.     lists and back)
  38.  
  39. 5)  &FAIL   equivalent to    NOT &NULL    and    \&NULL
  40.  
  41. 6) PROC() doesn't work unless the procedure has been called at
  42.     least once.
  43.  
  44. 7) can't get RE_FIND (from IPL) to match greedily
  45.  
  46. 8) STRING SCANNING is rather low-level (position-centered)
  47.    and so a bit awkward (had to write most high-level functions
  48.    myself), same applies to....
  49.  
  50. 9) CO-EXPRESSIONS: powerful (possibilities for declarative
  51.     programming, "lazy" evaluation, etc.) but not very intuitive 
  52.    and (low-level) behavior sometimes puzzling
  53.  
  54.    - at times ^CE or @^CE won't work, while
  55.      CE:=^CE seems to do the trick.
  56.  
  57.    - below are 3 expressions in order of evaluation time
  58.      (approx. 1x, 4x, 8x)
  59.  
  60.      every write(lazy{z:=(1 to 50000), (5 > z)})
  61.      every write(5 >       (1 to 50000))
  62.      every write(      (z:=(1 to 50000),(5 > z)))
  63.  
  64.      procedure lazy(p)
  65.      local a,b,c
  66.      a:=get(p); b:=get(p)
  67.      while (c:=(@a  @  ^b)) do {suspend c}
  68.      end
  69. -------------------------------------------------------------------------------------------------
  70. Great concise language overall, but generators and especially
  71. co-expressions not easy to get into
  72.  
  73. Bob.
  74. ======
  75.  
  76.  
  77.  
  78.